// @import '~@inbiz/components/style/index.less';

.inbiz-EformSelectMember-SelectExtend {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 32px;
  overflow: hidden;
  line-height: 32px;
  border: 1px solid #ddd;
  border-radius: var(--inbiz-border-radius-base);

  &:hover {
    border-color: var(--inbiz-color-primary);
  }

  &:focus {
    border-color: var(--inbiz-color-primary);
    border-right-width: 1px;
    outline: 0;
    box-shadow: 0 0 0 2px var(--ant-primary-color-outline);
  }

  &.readOnly {
    &:hover {
      border-color: #ddd;
    }

    &:focus {
      border-color: #ddd;
      border-right-width: 1px;
      outline: 0;
      box-shadow: 0 0 0 2px var(--ant-primary-color-outline);
    }
  }

  &-addonBefore-us {
    position: absolute;
    right: 0;
    box-sizing: border-box;
    padding: 0 11px 0 0;
    color: var(--inbiz-color-primary);
    line-height: 30px;
    white-space: nowrap;
    background-color: #fff;
    cursor: pointer;
    user-select: none;

    >.anticon {
      width: 15px;
      height: 15px;
      margin-right: 0;
      color: rgba(0, 0, 0, 0.25);

      &:hover {
        color: var(--inbiz-color-primary);
      }
    }

    &::after {
      display: none;
    }
  }

  &-select.ant-select {
    flex: 1;
    width: unset;
    height: 100%;
    overflow: hidden;

    >.ant-select-selector {
      display: flex;
      align-items: center;
      height: 100%;
      border: none;
      box-shadow: none;

      .ant-select-selection-overflow {
        flex-wrap: nowrap;

        .ant-select-selection-overflow-item {
          >span {
            overflow: hidden;
          }
        }
      }

      .ant-select-selection-placeholder {
        font-size: var(--inbiz-font-size-base);
      }
    }

    &:not(.ant-select-customize-input) {
      >.ant-select-selector {
        border: none;
        border-radius: 0;
      }
    }

    &.ant-select-focused {
      .ant-select-selector {
        border: none !important;
        box-shadow: none !important;
      }
    }
  }
}

.inbiz-EformSelectMember-SelectExtend.active-focus {
  border-color: var(--inbiz-color-primary) !important;
  border-right-width: 1px;
  outline: 0;
  box-shadow: 0 0 0 2px var(--ant-primary-color-outline);
}

.inbiz-EformSelectMember-SelectExtend.single-mode {
  justify-content: space-between;

  &>span:first-child {
    padding-left: 8px;
  }
}

.inbiz-EformSelectMember-SelectExtend.multiple-mode {
  flex-direction: row-reverse;
}

.inbiz-EformMemberSelect-Dropdown {
  max-height: 426px;
  padding: 0 8px;
  overflow: auto;
  font-size: var(--inbiz-font-size-base);
  background-color: #fff;

  &::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  .inbiz-EformMemberSelect-DropdownItem {
    display: flex;
    align-items: center;
    height: 39px;
    margin-bottom: 1px;
    padding: 0 5px;
    color: #000;
    font-size: var(--inbiz-font-size-base);
    line-height: 39px;
    border-radius: 4px;
    cursor: default;

    >div {
      flex: 1;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    >svg {
      margin-right: 4px;
    }

    &.isFocus {
      background-color: #f5f5f5;
    }
  }
}